package com.ybkj.daijia.server.model;


/**
 * 版本
 *
 * @author Shine
 */
// @Entity
// @Table(name = Constant.TABLE_PREFIX + "appversion")
// @Cache(usage=CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class AppVersion extends Base {

    /**
     *
     */
    private static final long serialVersionUID = 1L;

    // @Column(nullable=false)
    private String shortversion;// 显示版本号

    // @Column(nullable=false)
    private Integer buildversion;// 比较版本号

    // @Column(nullable=false)
    private Boolean mandatory;// 是否强制更新

    private Long appsize;// app大小（kb）

    // @Column(nullable=false)
    private String downloadurl;// 下载地址

    // @Column(nullable=false)
    private String title;

    // @Column(nullable=false)
    private String notes;// 更新内容

    // @Column(nullable=false,unique=true)
    // @Enumerated(EnumType.STRING)
    private AppVersionType appVersionType; // 类型

    public String getShortversion() {
        return shortversion;
    }

    public void setShortversion(String shortversion) {
        this.shortversion = shortversion;
    }

    public Integer getBuildversion() {
        return buildversion;
    }

    public void setBuildversion(Integer buildversion) {
        this.buildversion = buildversion;
    }

    public Boolean getMandatory() {
        if (null == mandatory) {
            return false;
        }
        return mandatory;
    }

    public void setMandatory(Boolean mandatory) {
        this.mandatory = mandatory;
    }

    public Long getAppsize() {
        return appsize;
    }

    public void setAppsize(Long appsize) {
        this.appsize = appsize;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getNotes() {
        return notes;
    }

    public void setNotes(String notes) {
        this.notes = notes;
    }

    public AppVersionType getAppVersionType() {
        return appVersionType;
    }

    public void setAppVersionType(AppVersionType appVersionType) {
        this.appVersionType = appVersionType;
    }

    public String getDownloadurl() {
        return downloadurl;
    }

    public void setDownloadurl(String downloadurl) {
        this.downloadurl = downloadurl;
    }

    public enum AppVersionType {
        /**
         * 安卓司机端
         */
        androiddriver,
        /**
         * 安卓客户端
         */
        androidcustomer,
        /**
         * ios司机端
         */
        iosdriver,
        /**
         * ios客户端
         */
        ioscustomer
    }

}
